package com.hyz.controller.repositoryManager;

import com.hyz.pojo.repository.Repository;
import com.hyz.service.repositoryManager.RepositoryManagerService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pojo.ResponseResult;

import java.util.List;

/**
 * @author HGD
 * @date 2022/10/1 10:26
 */
@RestController
@RequestMapping("/asset")
public class RepositoryManagerController {
    @Autowired
    private RepositoryManagerService repositoryManagerService;

    @PostMapping("/getAllRepositories")
    public List<Repository> getAllRepositories() {
        return repositoryManagerService.getAllRepositories();
    }

    @PostMapping("/getChargeRepository")
    public List<Repository> getChargeRepository(@RequestBody Long repositoryManagerId) {
        return repositoryManagerService.getChargeRepository(repositoryManagerId);
    }
}
